{{--轮播组件--}}
@if (isset($list) && !empty($list))
    @if(count($list)>1 || $always)
        <div id="{{ $id }}" class="carousel slide {{$class}}" data-ride="carousel">
            <ol class="carousel-indicators">
                @foreach ($list as $item)
                    <li data-target="#{{ $id }}" data-slide-to="{{$loop->index}}"
                        class="{{$loop->index==0?'active':''}}"></li>
                @endforeach
            </ol>
            <div class="carousel-inner">
                @foreach ($list as $item)
                    <div class="carousel-item {{$loop->index==0?'active':''}}" data-interval="{{$interval}}">
                        <a {{$item['href_']??''}} {{$item['href_target_']??''}} {{$item['rel_']??''}} ><img
                                src="{{$item['image_url']??''}}" alt="{{$item['name']??''}}" class="carousel-img"></a>
                        @if ($showTitle || $showDesc)
                            <div class="carousel-caption d-none d-md-block">
                                @if ($showTitle)
                                    <h5>{{$item[$name]??''}}</h5>
                                @endif
                                @if ($showDesc)
                                    <p>{{$item['description']??''}}</p>
                                @endif
                            </div>
                        @endif
                    </div>
                @endforeach
            </div>
            <button class="carousel-control-prev" type="button" data-target="#{{ $id }}" data-slide="prev">
                <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                <span class="sr-only">Previous</span>
            </button>
            <button class="carousel-control-next" type="button" data-target="#{{ $id }}" data-slide="next">
                <span class="carousel-control-next-icon" aria-hidden="true"></span>
                <span class="sr-only">Next</span>
            </button>
        </div>
    @else
        @foreach ($list as $item)
            <a {{$item['href_']??''}} {{$item['href_target_']??''}} {{$item['rel_']??''}}>
                <img src="{{$item['image_url']??''}}" alt="{{$item['name']??''}}" class="carousel-img">
            </a>
        @endforeach
    @endif
@endif
